package bishi.kuaishou;

import java.util.*;

public class demo1 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        List<Integer> arry = new ArrayList<>();

        while(in.hasNextInt()) {
            arry.add(in.nextInt());
        }
        Map<Integer,Integer>  map = new HashMap<>();
        int ret= 0;
        for(int x : arry) {
            if(map.containsKey(x)) {
                ret++;
                map.put(x,map.getOrDefault(x,0) + 1);
            }
        }


        System.out.println(ret);
    }
}
